package com.xmy.cultivate.mapper;

import com.xmy.cultivate.entity.StoreGoodsBatch;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 下单批次 Mapper 接口
 * </p>
 *
 * @author hpiggy
 * @since 2024-07-30
 */
public interface StoreGoodsBatchMapper extends BaseMapper<StoreGoodsBatch> {

    @Select("select IFNULL(MAX(batch_num),0) as num from store_goods_batch where year_part = ${yearPart} and quarter_num =${quarterNum}")
    public Integer getMaxBatchNum(@Param("yearPart") Integer yearPart,@Param("quarterNum") Integer quarterNum);


}
